CoglTexture *buffer;
CoglOffscreen *offscreen;
CoglFramebuffer *fb;
+ CoglContext *ctx;
CoglColor clear_color;
CoglError *catch_error = NULL;
float x, y;
- buffer = cogl_texture_new_with_size (width,
- height,
- COGL_TEXTURE_NO_SLICING,
- COGL_PIXEL_FORMAT_ANY);
+ ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
+ buffer = cogl_texture_2d_new_with_size (ctx, width, height);
if (buffer == NULL)
return NULL;
gfloat min_width,
gfloat min_height)
{
- return cogl_texture_new_with_size (min_width,
- min_height,
- COGL_TEXTURE_NO_SLICING,
- COGL_PIXEL_FORMAT_RGBA_8888_PRE);
+ CoglContext *ctx =
+ clutter_backend_get_cogl_context (clutter_get_default_backend ());
+
+ return cogl_texture_2d_new_with_size (ctx, min_width, min_height);
}
static char *
st_theme_node_prerender_shadow (StThemeNodePaintState *state)
{
StThemeNode *node = state->node;
+ CoglContext *ctx;
guint border_radius[4];
int max_borders[4];
int center_radius, corner_id;
CoglHandle buffer, offscreen = COGL_INVALID_HANDLE;
CoglError *error = NULL;
+ ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
+
/* Get infos from the node */
if (state->alloc_width < node->box_shadow_min_width ||
state->alloc_height < node->box_shadow_min_height)
}
/* Render offscreen */
- buffer = cogl_texture_new_with_size (state->box_shadow_width,
- state->box_shadow_height,
- COGL_TEXTURE_NO_SLICING,
- COGL_PIXEL_FORMAT_ANY);
+ buffer = cogl_texture_2d_new_with_size (ctx,
+ state->box_shadow_width,
+ state->box_shadow_height);
if (buffer == NULL)
return;
const ClutterActorBox *allocation)
{
StThemeNodeTransitionPrivate *priv = transition->priv;
+ CoglContext *ctx;
guint width, height;
CoglError *catch_error = NULL;
/* template material to avoid unnecessary shader compilation */
static CoglHandle material_template = COGL_INVALID_HANDLE;
+ ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
width = priv->offscreen_box.x2 - priv->offscreen_box.x1;
height = priv->offscreen_box.y2 - priv->offscreen_box.y1;
if (priv->old_texture)
cogl_handle_unref (priv->old_texture);
- priv->old_texture = cogl_texture_new_with_size (width, height,
- COGL_TEXTURE_NO_SLICING,
- COGL_PIXEL_FORMAT_ANY);
+ priv->old_texture = cogl_texture_2d_new_with_size (ctx, width, height);
if (priv->new_texture)
cogl_handle_unref (priv->new_texture);
- priv->new_texture = cogl_texture_new_with_size (width, height,
- COGL_TEXTURE_NO_SLICING,
- COGL_PIXEL_FORMAT_ANY);
+ priv->new_texture = cogl_texture_2d_new_with_size (ctx, width, height);
if (priv->old_texture == COGL_INVALID_HANDLE)
return FALSE;